package com.longfor.dragonshard.dto.account;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 
 * @author chi.zhang
 * @create 2017/10/21 下午6:04
 *
 * @version v1.0
 **/
public class LoginDTO implements Serializable {
    private static final long serialVersionUID = -1L;

    /**
     * 用户名
     */
    @NotBlank
    @Length(min=1, max=30)
    private String userName;

    /**
     * 密码(密文)
     */
    @NotNull
    @Length(min = 1, max = 256)
    private String password;

    /**
     * 验证码code
     */
    @NotNull
    private String validateCode;

    /**
     * 验证码key
     */
    @NotNull
    private String validateKey;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getValidateCode() {
        return validateCode;
    }

    public void setValidateCode(String validateCode) {
        this.validateCode = validateCode;
    }

    public String getValidateKey() {
        return validateKey;
    }

    public void setValidateKey(String validateKey) {
        this.validateKey = validateKey;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("userName", userName)
                .append("password", password)
                .append("validateCode", validateCode)
                .append("validateKey", validateKey)
                .toString();
    }
}